package cn.changein.framework.admin.setting.contactType.wrapper;

import cn.changein.framework.base.wrapper.BaseControllerWrapper;
import cn.changein.framework.core.constant.factory.ConstantFactory;
import cn.changein.framework.core.util.DecimalUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.Map;

public class ContactTypeWrapper extends BaseControllerWrapper {

    public ContactTypeWrapper(Page<Map<String, Object>> page) {
        super(page);
    }

    @Override
    protected void wrapTheMap(Map<String, Object> map) {
        Long creater = DecimalUtil.getLong(map.get("createUser"));
        Long update = DecimalUtil.getLong(map.get("updateUser"));
        map.put("creatorName", ConstantFactory.me().getUserNameById(creater));
        map.put("updaterName", ConstantFactory.me().getUserNameById(update));
    }
}
